// CommitChart.js
import { Line, mixins } from 'vue-chartjs'

// export default {
//   extends: Line,
//   mounted() {
//     // Overwriting base render method with actual data.
//     this.renderChart({
//       labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'January', 'February', 'March', 'April', 'May', 'June', 'July'],
//       datasets: [{
//         // label: 'Data One',
//         // backgroundColor: '#f87979',
//         backgroundColor: 'rgba(0, 0, 0, 0)',

//         data: [40, 39, 10, 40, 39, 80, 40, 40, 39, 10, 40, 39, 80, 40, 40, 39, 10, 40, 39, 80, 40]
//       }]
//     }, { responsive: true, maintainAspectRatio: false })
//   }
// }

export default {
  extends: Line,
  props: [ 'data','options'],
  watch: {
    data: function(now, old) {
      // console.log('reload', this.$data)
      this.renderChart(now, this.options)
    }
  },
  mounted() {
    this.renderChart(this.data, this.options)
  }
}


